<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Table_CommodityCat_AddColumn_FatherId extends CI_Migration
{
    public function up()
    {
        $fields = array(
            'father_id' => array('type' => 'INT', 'constraint' => '9', 'default' => '0',)
        );
        $this->dbforge->add_column('commodity_cat', $fields);
    }

    public function down()
    {
        $this->dbforge->drop_column('commodity_cat', 'father_id');
    }
} 